<!DOCTYPE html> <title>Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<style>
  @import '/reset.css';
  #reference {
    width: 200px;
    height: 200px;
    background-color: red;
    box-shadow: inset 0 0 0 1px black;
  }

  #popper {
    width: 100px;
    height: 100px;
    background-color: rebeccapurple;
    box-shadow: inset 0 0 0 1px black;
  }

  #divA {
    margin-left: 500px;
    overflow: hidden;
  }

  #divB {
    position: absolute;
    left: 200px;
    height: 500px;
    width: 500px;
  }
</style>

<div id="divA">
  <div id="divB">
    <div id="reference">Reference</div>
    <div id="popper">Popper</div>
  </div>
</div>

<script type="module">
  import { createPopper } from './dist/popper.js';
  const reference = document.querySelector('#reference');
  const popper = document.querySelector('#popper');
  createPopper(reference, popper, {
    placement: 'bottom-start',
  });
</script>
